<%-- 
    Document   : updateBoard
    Created on : 2012. 4. 20, 오후 3:33:51
    Author     : jeong
--%>

<%@page import="com.webproject.jsp.board.BoardManager"%>
<%@page import="com.webproject.jsp.common.CommonUtil"%>
<%@page import="com.webproject.jsp.board.model.Board"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%  
    request.setCharacterEncoding("UTF-8");
    request.setAttribute("PAGETITLE","게시판 상세 화면");
    
    String num = CommonUtil.strChkNull((String)request.getParameter("selectedNum"),"");
    String title = CommonUtil.strChkNull((String)request.getParameter("title"),"");
    String content = CommonUtil.strChkNull((String)request.getParameter("content"),"");
    String password = CommonUtil.strChkNull((String)request.getParameter("password"),"");
    
    System.out.println("\n >>> UpdateBoard.jsp");
    System.out.println(">>> num is " + num);
    System.out.println(">>> title is " + title);
    System.out.println(">>> content is " + content);
    System.out.println(">>> password is " + password);

    BoardManager bm = BoardManager.getInstance();
  
    Board board = new Board();
              
    board.setNo(CommonUtil.intChkNull(Integer.parseInt(num)));
    board.setTitle(title);
    board.setContent(content);
    board.setPassword(password);
    board.setUpdUserId("test01");
    
    bm.updateBoard(board);
      
%>
<jsp:forward page="/template/template.jsp">
    <jsp:param name="CONTENTPAGE" value="/board/selectBoard.jsp" />
</jsp:forward>
